package com.foeye.thread;

import java.lang.Thread;

public class Test001 {
	
	@SuppressWarnings("static-access")
	public static void main(String[] args) {
		System.out.println(Thread.currentThread().getName());
//		MyThread myThread = new MyThread();
//		myThread.start();
		
//		Thread thread = new Thread(new MyRunnable());
//		thread.start();
		
		
		try {
			System.out.println(Thread.currentThread().getName());  
			MyThread myThread=new MyThread();  
			myThread.start();  
			myThread.sleep(1000);//这里sleep的就是main线程，而非myThread线程  
			Thread.sleep(10);  
			for(int i=0;i<100;i++){  
			    System.out.println("main"+i);  
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}  
	}
	
	


}